using UnityEngine;
using System.Collections;

[System.Serializable]
public class Game : MonoBehaviour {	
	public int difficulty = 0;
	public bool inventoryShown = false;
	
	public static int DIFFICULTY_EASY = 0;
	public static int DIFFICULTY_NORMAL = 1;
	public static int DIFFICULTY_HARD = 2;
	public static int DIFFICULTY_HARDCORE = 3;
	
	public static Game game;
	public static Inventory1 inventory;
	
	public int anxietyLevel = 1;
	
	public System.Random random;
	
	public bool isPlayerInsideSafePlace = false;
	
	public NavPoint moveStalkingMonsterToThisWhenPLayerIsSafe;
	public NavPoint playerNavPoint;
	
	public Game() {		
		Game.game = this;
		random = new System.Random();
	}
	
	public float getFlashlightMaxPower() {
		float easy = 30 * 60;
		float normal = 20 * 60;
		float hard = 15 * 60;
		float hardcore = 10 * 60;
		
		if (difficulty == DIFFICULTY_EASY) {
			return easy;	
		} else if (difficulty == DIFFICULTY_NORMAL) {
			return normal;	
		} else if (difficulty == DIFFICULTY_HARD) {
			return hard;	
		} else if (difficulty == DIFFICULTY_HARDCORE) {
			return hardcore;	
		}
		
		// None, easy as standard
		return easy;
	}
	
	public int getInventoryColumns() {
		int easy = 8;
		int normal = 6;
		int hard = 4;
		int hardcore = hard;
		
		if (difficulty == DIFFICULTY_EASY) {
			return easy;	
		} else if (difficulty == DIFFICULTY_NORMAL) {
			return normal;	
		} else if (difficulty == DIFFICULTY_HARD) {
			return hard;	
		} else if (difficulty == DIFFICULTY_HARDCORE) {
			return hardcore;	
		}
		
		// None, easy as standard
		return easy;
	}
	
	public int getInventoryRows() {
		int easy = 4;
		int normal = 4;
		int hard = 4;
		int hardcore = hard;
		
		if (difficulty == DIFFICULTY_EASY) {
			return easy;	
		} else if (difficulty == DIFFICULTY_NORMAL) {
			return normal;	
		} else if (difficulty == DIFFICULTY_HARD) {
			return hard;	
		} else if (difficulty == DIFFICULTY_HARDCORE) {
			return hardcore;	
		}
		
		// None, easy as standard
		return easy;
	}
}
